import request from '@/utils/request'

// 查询请假单列表
export function listLeaveForm(query) {
  return request({
    url: '/hr/leaveForm/list',
    method: 'get',
    params: query
  })
}

// 查询请假单详细
export function getLeaveForm(id) {
  return request({
    url: '/hr/leaveForm/' + id,
    method: 'get'
  })
}
// 查询请假单详细
export function handleTjsq(id) {
  return request({
    url: '/hr/leaveForm/handleTjsq/' + id,
    method: 'get'
  })
}


// 新增请假单
export function addLeaveForm(data) {
  return request({
    url: '/hr/leaveForm',
    method: 'post',
    data: data
  })
}

// 修改请假单
export function updateLeaveForm(data) {
  return request({
    url: '/hr/leaveForm',
    method: 'put',
    data: data
  })
}

// 删除请假单
export function delLeaveForm(id) {
  return request({
    url: '/hr/leaveForm/' + id,
    method: 'delete'
  })
}
